<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <script src="../node_modules/vue/dist/vue.global.js"></script>
    <title>Document</title>
  </head>
  <body>
    <div id="app"></div>
    <script>
      const { reactive, effect } = Vue
      const target = {
        name: 'lixx',
        age: 27
      }
      const state = reactive(target)
      const state1 = reactive(target)
      const state2 = reactive(state1)
      console.log(state === state1, state1 === state2) // true true

      effect(() => {
        document.getElementById('app').innerHTML = `我的名字是：${state.name}, 我${state.age}岁了`
      })

      setTimeout(() => {
        state.age = 28
      }, 4000)
    </script>
  </body>
</html>
